package Controllers;

import DB.DBRound;
import Models.Round;
import java.util.ArrayList;
import java.util.HashMap;

// <editor-fold defaultstate="collapsed" desc=" UML Marker ">
// #[regen=yes,id=DCE.E4035498-FE8A-18CF-AB70-11AA215B2752]
// </editor-fold> 
public class RoundController extends ControllerAbstract<Round>
{
	// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
	// #[regen=yes,id=DCE.B1B3ADC1-548B-2121-3B72-D61634646A49]
	// </editor-fold> 
	public RoundController ()
	{}

	public int insert(HashMap data)
	{
		DBRound dbr = new DBRound();
		return dbr.insert(data);
	}

	public Round find(String id)
	{
		DBRound dbr = new DBRound();
		return dbr.fetchRow("roundNo = "+id, null);
	}

	public int update(HashMap data, String where, int limit)
	{
		DBRound dbr = new DBRound();
		return dbr.update(data, where, limit);
	}

	public int delete(int id)
	{
		DBRound dbr = new DBRound();
		return dbr.delete("roundNo = "+id, 1);
	}

	public ArrayList<Round> fetchAll()
	{
		DBRound dbc = new DBRound();
		return dbc.fetchAll();
	}
}